<!-- @license MIT -->

<!-- This generates a button to toggle full screen mode -->

<button onclick="toggleFullScreen();">
    Toggle Full Screen
</button>

<div style="max-width: 50px; max-height: 50px; overflow: hidden;">
    <script>
        function toggleFullScreen() {
            var mainHeader = document.getElementById("mainHeader");
            var subHeader = document.getElementById("subHeader");
            
            if (mainHeader.style.display == "none") {
                mainHeader.style.display = "";
                subHeader.style.display = "";
            } else {
                mainHeader.style.display = "none";
                subHeader.style.display = "none";
            }

            // If possible, register changes in cookies
            if (typeof setCookie == "function") {
                if (mainHeader.style.display == "none")
                    setCookie("fullScreen", "yes");
                else
                    setCookie("fullScreen", "no");
            }
        }
    </script>
</div>
